<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        var xfs;
        var xz;
        var ys;
        for(var xfs=0;xfs<=6;++xfs)
        {

            for(var xz=0;xz<=50;++xz)
            {
                for(var ys=0;ys<=20;ys++)
                {
                      if(16*xfs+2*xz+5*ys==100){
                        document.write(xfs);
                        document.write('需要洗发水');
                        document.write(xz);
                        document.write('需要香皂');
                        document.write(ys);
                        document.write('需要牙刷<br>');
                        }
           
                    
                }
            }
        }
    </script>
</body>
</html>